/**
机构人员信息
 */
$(function(){
    $.ajax({
        url:'/main/selectJgryxx',
        type: "GET",
        dataType: "json",
        success: function (data) {
            $('#department').html(!data.department?'--暂无--':data.department);
            var htmlStr="";
            var phone = "";
            if(data.data.length){
                for(var i=0,len=data.data.length;i<len;i++){
                    htmlStr+='<li>';
                    htmlStr+='<div class="org-info-lable">'+data.data[i].duty+'：'+data.data[i].name+'</div>';
                    if(data.data[i].phone.indexOf("|")>-1){
                        phone = data.data[i].phone.replace("|","\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
                    }else{
                        phone = data.data[i].phone;
                    }
                    // htmlStr+='<span>电话：'+data.data[i].phone+'</span>';
                    htmlStr+='<span>电话：'+phone+'</span>';
                    htmlStr+='</li>';
                }
                $('.info-box').html(htmlStr);
            }else{
                htmlStr+='<div>';
                htmlStr+='<img style="display: block;margin: 35% auto 10%;" width="90%" src="/static/images/data-empty.png"/>';
                htmlStr+='<div style="text-align: center;">暂无人员信息</div>';
                htmlStr+='</div>';
                $('.info-box').html(htmlStr);
            }
        }
    })
})